<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>品优购</title>
    <link rel="stylesheet" href="/lib/fontawesome/css/font-awesome.css">
    <link rel="stylesheet" href="/lib/mui/css/mui.css">
    <link rel="stylesheet" href="/css/common.css">
    <link rel="stylesheet" href="/css/index.css">
</head>

<body>
    <header>
        <div class="mui-input-row mui-search">
            <input type="search" class="mui-input-clear " placeholder="">
        </div>
    </header>

    <!-- 内容区 -->
    <div>
        <div class="content">
            <!-- 轮播图 -->
            <div class="mui-slider"></div>
            <!-- 分类导航 -->
            <div class="pyg_nav">
            </div>
            <!-- 商品列表 -->
            <div class="goods"></div>
        </div>
    </div>
    <!-- 尾部 -->
    <footer class="pyg_footer">
        <a href="/index.html">
            <span class="fa fa-home"></span>
            <span class="link_name">首页</span>
        </a>
        <a href="/pages/category.html">
            <span class="fa fa-list-ul"></span>
            <span class="link_name">分类</span>
        </a>
        <a href="javascript:;">
            <span class="fa fa-shopping-cart"></span>
            <span class="link_name">购物车</span>
        </a>
        <a href="/pages/login.html">
            <span class="fa fa-user"></span>
            <span class="link_name">我的</span>
        </a>
    </footer>
</body>
<script src="/lib/mui/js/mui.js"></script>
<script src="/lib/arttemplate/template-web.js"></script>
<script src="/lib/zepto/zepto.js"></script>
<script src="/js/common.js"></script>
<script src="/js/index.js"></script>

</html>

<!-- 轮播图模板 -->
<script type="text/html" id="groupId">

    <div class="mui-slider-group mui-slider-loop">
        <!--支持循环，需要重复图片节点-->
        <div class="mui-slider-item mui-slider-item-duplicate">
            <a href="#">
                <img src="{{arr[arr.length-1].image_src}}" />
            </a>
        </div>
        {{each arr value index}}
        <div class="mui-slider-item">
            <a href="#">
                <img src="{{value.image_src}}" />
            </a>
        </div>
        {{/each}}
        <!--支持循环，需要重复图片节点-->
        <div class="mui-slider-item mui-slider-item-duplicate">
            <a href="#">
                <img src="{{arr[0].image_src}}" />
            </a>
        </div>
    </div>

    <!-- 索引 -->
    <div class="mui-slider-indicator">
        {{each arr value index}} {{if index==0}}
        <div class="mui-indicator mui-active"></div>
        {{/if}} {{if index!=0}}
        <div class="mui-indicator"></div>
        {{/if}} {{/each}}
    </div>
</script>

<!-- 分类导航模板 -->
<script type="text/template" id="nav_id">
    {{each data value}}
    <a href="javascript:;">
        <img src="{{value.image_src}}" alt="">
    </a>
    {{/each}}
</script>

<!-- 商品列表 -->
<script type="text/template" id="goods_id">
    {{each data value}}
    <img src="{{value.group_img}}" alt="">
    <ul>
        {{each value.goods value2}}
        <li>
            <a href="/pages/detail.html?goods_id={{value2.goods_id}}">
                <img src="{{value2.goods_small_logo}}" alt="">
                <p class="name">{{value2.goods_name}}</p>
                <p class="price">￥{{value2.goods_price}}</p>
                <p class="resemble">
                    <span>找相似</span>
                </p>
            </a>
        </li>
        {{/each}}
    </ul>
    {{/each}}
</script>


<!-- 分类列表 -->
<script type="text/template" id="cate_id">
    {{each arr value}}
    <span>{{value.cat_name}}</span>

    {{each value value1}}
    <span>{{value1.cat_name}}</span>

    {{each value1 value2}}
    <span>{{value2.cat_name}}</span>

    {{/each}} {{/each}} {{/each}}
</script>